﻿Public Class CiudadComuna


    Implements IDisposable
    Dim szSQL As String
    Public _CodCiudad As Integer
    

    Public Sub Get_Comuna(ByVal rp As NetResponse.MsSqlServer)
        Dim exec As New DotNetDAL.SqlServerTransaccion()
        rp.Query = "Select CodComuna,Nombre from Tbl_Comuna  Where CodCiudad = " & _CodCiudad.ToString & " order by Nombre"

        exec.Executedataset(rp, rp.Query)
        exec.Dispose()

    End Sub

    
    Public Sub Get_Ciudad(ByVal rp As NetResponse.MsSqlServer)
        Dim exec As New DotNetDAL.SqlServerTransaccion()
        rp.Query = "Exec sp_LlenaCiudad"

        exec.Executedataset(rp, rp.Query)
        exec.Dispose()

    End Sub


#Region " IDisposable Support "

    Private disposedValue As Boolean = False        ' To detect redundant calls


    Protected Overridable Sub Dispose(ByVal disposing As Boolean)
        If Not Me.disposedValue Then
            If disposing Then
                ' TODO: free unmanaged resources when explicitly called
            End If

            ' TODO: free shared unmanaged resources
        End If
        Me.disposedValue = True
    End Sub

    ' This code added by Visual Basic to correctly implement the disposable pattern.
    Public Sub Dispose() Implements IDisposable.Dispose
        ' Do not change this code.  Put cleanup code in Dispose(ByVal disposing As Boolean) above.
        Dispose(True)
        GC.SuppressFinalize(Me)
    End Sub
#End Region
End Class
